﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:p="clr-namespace:Lithnet.Acma.Presentation"
                    xmlns:c="clr-namespace:Lithnet.Common.Presentation;assembly=Lithnet.Common.Presentation">

    <HierarchicalDataTemplate DataType="{x:Type p:UnitTestFileViewModel}"
                              ItemsSource="{Binding Path=UnitTestObjects}">
        <p:TreeViewItemControl>
            <p:TreeViewItemControl.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Add unit test"
                              Command="{Binding Commands.AddUnitTest}" />
                    <MenuItem Header="Add unit test group"
                              Command="{Binding Commands.AddUnitTestGroup}" />
                    <Separator />
                    <MenuItem Header="Paste"
                              Command="{Binding Commands.Paste}" />

                </ContextMenu>
            </p:TreeViewItemControl.ContextMenu>
        </p:TreeViewItemControl>
    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type p:UnitTestObjectsViewModel}"
                              ItemsSource="{Binding Path=.}">
        <p:TreeViewItemControl>
            <p:TreeViewItemControl.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Add unit test"
                              Command="{Binding Commands.AddUnitTest}" />
                    <MenuItem Header="Add unit test group"
                              Command="{Binding Commands.AddUnitTestGroup}" />
                    <Separator />
                    <MenuItem Header="Paste"
                              Command="{Binding Commands.Paste}" />

                </ContextMenu>
            </p:TreeViewItemControl.ContextMenu>
        </p:TreeViewItemControl>
    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type p:UnitTestGroupViewModel}"
                              ItemsSource="{Binding Path=UnitTestObjects}">
        <p:TreeViewItemControl>
            <p:TreeViewItemControl.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Add unit test"
                              Command="{Binding Commands.AddUnitTest}" />
                    <MenuItem Header="Add unit test group"
                              Command="{Binding Commands.AddUnitTestGroup}" />
                    <Separator />
                    <MenuItem Header="Delete"
                              Command="{Binding Commands.Delete}" />
                    <Separator />
                    <MenuItem Header="Cut"
                              Command="{Binding Commands.Cut}" />
                    <MenuItem Header="Copy"
                              Command="{Binding Commands.Copy}" />
                    <MenuItem Header="Paste"
                              Command="{Binding Commands.Paste}" />

                </ContextMenu>
            </p:TreeViewItemControl.ContextMenu>
        </p:TreeViewItemControl>
    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type p:UnitTestViewModel}"
                              ItemsSource="{Binding Path=Steps}">
        <p:TreeViewItemControl>
            <p:TreeViewItemControl.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Add object creation"
                              Command="{Binding Commands.AddUnitTestObjectCreation}" />
                    <MenuItem Header="Add object modification"
                              Command="{Binding Commands.AddUnitTestObjectModification}" />
                    <MenuItem Header="Add object evaluation"
                              Command="{Binding Commands.AddUnitTestObjectEvaluation}" />
                    <Separator />
                    <MenuItem Header="Delete"
                              Command="{Binding Commands.Delete}" />
                    <Separator />
                    <MenuItem Header="Cut"
                              Command="{Binding Commands.Cut}" />
                    <MenuItem Header="Copy"
                              Command="{Binding Commands.Copy}" />
                    <MenuItem Header="Paste"
                              Command="{Binding Commands.Paste}" />
                </ContextMenu>
            </p:TreeViewItemControl.ContextMenu>
        </p:TreeViewItemControl>

    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type p:UnitTestStepsViewModel}"
                              ItemsSource="{Binding Path=.}">
        <p:TreeViewItemControl />

    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type p:UnitTestStepObjectEvaluationViewModel}"
                              ItemsSource="{Binding Path=ChildNodes}">
        <p:TreeViewItemControl>
            <p:TreeViewItemControl.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Delete step..."
                              Command="{Binding Commands.DeleteStep}" />
                    <Separator />
                    <MenuItem Header="Cut"
                              Command="{Binding Commands.Cut}" />
                    <MenuItem Header="Copy"
                              Command="{Binding Commands.Copy}" />
                </ContextMenu>
            </p:TreeViewItemControl.ContextMenu>
        </p:TreeViewItemControl>

    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type p:UnitTestStepObjectModificationViewModel}">
        <p:TreeViewItemControl>
            <p:TreeViewItemControl.ContextMenu>
                    <ContextMenu>
                        <MenuItem Header="Delete step..."
                                  Command="{Binding Commands.DeleteStep}" />
                    <Separator />
                    <MenuItem Header="Cut"
                              Command="{Binding Commands.Cut}" />
                    <MenuItem Header="Copy"
                              Command="{Binding Commands.Copy}" />
                </ContextMenu>
            </p:TreeViewItemControl.ContextMenu>
        </p:TreeViewItemControl>

    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type p:UnitTestStepObjectCreationViewModel}">
        <p:TreeViewItemControl>
            <p:TreeViewItemControl.ContextMenu>
                <ContextMenu>
                   <MenuItem Header="Delete step..."
                              Command="{Binding Commands.DeleteStep}" />
                    <Separator />
                    <MenuItem Header="Cut"
                              Command="{Binding Commands.Cut}" />
                    <MenuItem Header="Copy"
                              Command="{Binding Commands.Copy}" />
                </ContextMenu>
            </p:TreeViewItemControl.ContextMenu>
        </p:TreeViewItemControl>

    </HierarchicalDataTemplate>

</ResourceDictionary>